#include "coroutines/HelloWorld.h"
#include <iostream>

namespace HelloWorld {

Coroutine CoroutineFunc() {
    std::cout << "Hello" << std::endl;
    co_await Awaiter<true>{};
    std::cout << "World!" << std::endl;
}

void Test() {
    auto CoroutineHandle = CoroutineFunc();
    CoroutineHandle.resume(); // 输出 Hello
    CoroutineHandle.resume(); // 输出 World!
    std::cout << CoroutineHandle.handle.done() << std::endl;
}

}
